home *** CD-ROM | disk | FTP | other *** search
/ El Mac 1 / Magazine.iso / EL MAC 1 / Shareware / Comms. & Networking / dataComet 4.1.7A / Documents / 3. Macros < prev    next >
Encoding:
Text File  |  1995-09-14  |  15.6 KB  |  322 lines  |  [TEXT/3278]

  1.       dataComet 4.1.7A preliminary documentation.  
  2.       Copyright 1995 databeast, Inc. All Rights Reserved.
  3.  
  4.          Cursor Motion
  5.          Sending PF keys
  6.          Finding strings and otherwise setting the selection
  7.          Controlling the emulator
  8.          Menu commands
  9.          File and Print commands
  10.          Edit commands
  11.          Special copy functions
  12.          Window selection and output redirection commands
  13.          Telnet commands
  14.          Scripting commands
  15.  
  16.       ___________________________________________________
  17.  
  18.          Using Macros
  19.       ___________________________________________________
  20.  
  21.  
  22.    dataComet allows you to record macros to perform functions such as moving the cursor, making a selection, or appending the selection to a file.  Macros can be entered and executed in the .edit window.  Pressing the Enter key while the .edit window is the frontmost window causes the current line or selection to be executed as a macro.  
  23.  
  24.    Dialogs in the Macro menu allow you to paste in or enter a sequence of macro commands; you can trigger a macro with key-combinations (such as Control Option A) you enter on the keyboard or the mouse single- or double-click (using ("Define key macros" or "Set double-click macro" in the Control menu).  You can also define a macro to execute when a connection with a host is complete ("Set Connection macro...") or when the user closes the connection ("Set Close macro...").
  25.  
  26.    The Key Macro on/off switch is in the Macro menu; when macros are on, an M appears in a box on the top left hand side of the screen.  When a key macro is currently executing, the M appears in reverse video; the reverse M also appears if keystrokes are pending execution in the key queue.  If you wish to cancel the execution of a macro or pending keyststrokes, use Command-'.'.
  27.  
  28.    When the dialog for entering key macros comes up, you have three options:  select a key, get help, show a list of macros currently associated with keys, or quit the dialog.  A prompt appears saying "You may press a key-combination to modify the macro for that key..."  If you press a key-combination, the dialog will show you the name of the key, and will allow you to enter actions (text and commands) you want the key-combination to produce.  If there is a key macro associated with that key, the Delete key will be turned on, and the actions associated with the key will be displayed.  Note that holding down the mouse button when you press the key-combination will identify the key as an "Alt-key," and such a macro will only be matched if the "ALT" state is set using the "!CA" command documented below (this allows you to switch keyboard configurations with a keystroke, and is used with library keymapping--see the "ALA" dataComet configuration document for an example of extensive key remapping).  When the "ALT" state is on, the boxed "M" which shows that key macros are on changes to an "m". 
  29.  
  30.    You can modify the macro text by entering new text or using copy and paste with the Command-C and Command-V keys.  Command-. cancels your modifications to the key macro.  When you are finished, you must press the Set button if you want the changes to take effect. The program will then alert you if your entry has errors in the length of the codes.  (PLEASE NOTE that the codes are not checked for validity until you execute a key macro by typing the key when you have quit the dialog and Key Macros are set on!  Alerts will then inform you of any errors.)   If there is no error, the macros are updated immediately; there is no need to save the configuration to save the key macros in the document.  If you decide not to change the text, you should press the Cancel button.  You can then quit if you wish, or add, remove, or modify other keys.
  31.  
  32.    Text which you enter in the key macro window can be interpreted as either plain text or commands.  Individual characters stand for themselves--except for '!' & '\', which can be entered by using '!!' and '\\'.  These two characters are special:  '!' is used to introduce a command; '\' is used to enter a number, specified using three decimal digits, such as "\010".   This numeric entry can be used either in place of a character, or to enter a decimal numeric value.  
  33.  
  34.    ASCII control characters can be entered by pressing the option key and the character ('a' through 'z', Space, '[', ']', '\', '@', '^', '_', or '?').  
  35.  
  36.    Ordinary text can be entered directly in the text-editing field of the dialog.  Commands are entered as a '!' (exclamation point) followed by a pair of characters; the first character selects a class of action, and the second the particular type of this action.   In IBM mode, the macro dialogs present buttons to perform input of all the IBM function keys.  (PLEASE NOTE that dataComet does not automatically map the Return key to produce an "Enter," so you need to press the "Enter" button to send an Enter command to the host using a macro.)  The action classes and associated characters available in both ASCII and the "IBM Keymapping" modes are as follows:  
  37.  
  38.       ___________________________________________________
  39.  
  40.          Cursor Motion
  41.       ___________________________________________________
  42.  
  43.    Move to X-coordinate:  (X) followed by a decimal number specifying the column number (0-255).
  44.  
  45.       !X\000
  46.  
  47.    Move to Y-coordinate:  (Y) followed by a decimal number specifying the row number (0-32).  The Y command always positions the cursor in column 0.
  48.  
  49.       !Y\000
  50.       !Y\002!X\049  position the cursor on 50th column of the 3rd line
  51.  
  52.    Move the cursor:  (M), and a code:
  53.  
  54.       !ML   Move the cursor to the left;
  55.       !MD   Move the cursor down;
  56.       !MU   Move the cursor up;
  57.       !MR   Move the cursor right.
  58.  
  59.    The IBM 3270 also supports:
  60.  
  61.       !M0   Move the cursor home;
  62.       !M<   Move the cursor backwards one field;
  63.       !M>   Move the cursor forward one field;
  64.       !MN   Do a Newline.
  65.  
  66.  
  67.       ___________________________________________________
  68.  
  69.          Sending PF keys
  70.       ___________________________________________________
  71.  
  72.  
  73.       !P\001 through !P\036 map to PF keys 1 through 36 for both ASCII and IBM emulations.
  74.  
  75.    Send VT220 keys:
  76.  
  77.       !P\128      Find
  78.       !P\129      Insert
  79.       !P\130      Remove
  80.       !P\131      Select
  81.       !P\132      Previous screen
  82.       !P\133      Next screen
  83.  
  84.    Send 3270 PF action keys:
  85.  
  86.       !P\000      Sys Request
  87.       !P1         PA1
  88.       !P2         PA2
  89.       !P3         PA3
  90.       !PC         Clear
  91.       !PE         Enter
  92.  
  93.    Send 3270 local keys:
  94.  
  95.       !A          Backspace blank (that's a space there!)
  96.       !AB         Backspace delete
  97.       !AD         Delete character to right (x->)
  98.       !AE         Erase to end of field
  99.       !AI         Toggle insert mode
  100.       !AR         Reset
  101.       !AX         Erase Input
  102.  
  103.  
  104.       ___________________________________________________
  105.  
  106.          Finding strings and otherwise setting the selection
  107.       ___________________________________________________
  108.  
  109.  
  110.    Search for a string:  (/) followed by a string terminated with another macro or null ASCII character.
  111.  
  112.    To make a selection:  you must use four commands to set a selection range, each of which uses a number to specify the position on the screen numbered from 0; when all four codes have been received, the selection will be made.
  113.  
  114.       !S\000   selection start Y position, followed by the position 
  115.                number;
  116.       !T\000   selection start X position, followed by the position 
  117.                number; 
  118.       !U\023   selection end Y position, followed by the position 
  119.                number;
  120.       !V\079   selection end X position, followed by the position 
  121.                number.
  122.  
  123.       !S\000!T\000!U\002!V\079
  124.    
  125.    Shift selection left:  (<) followed by the number of spaces to shift the selection.
  126.  
  127.       !<\005
  128.  
  129.    Shift selection right:  (>) followed by the number of spaces to shift the selection.
  130.  
  131.       !>\010
  132.  
  133.    Set selection length:  (#) followed by the new length.
  134.  
  135.       !#\004
  136.  
  137.  
  138.       ___________________________________________________
  139.  
  140.          Controlling the emulator
  141.       ___________________________________________________
  142.  
  143.  
  144.    Perform an emulator action:  (C) followed by a code:
  145.  
  146.       !CA   Set the ALT (mousedown state) modifier bit for all 
  147.             keypresses.  This allows you to have an Alternate macro 
  148.             set.
  149.       !Ca   Set ALT off.
  150.       !CC   Close the session without a dialog.
  151.       !CE   Show the .edit window.
  152.       !Ce   Show the terminal emulator window.
  153.       !CD   Show MacTCP smoothed round-trip time and time-out
  154.             in the upper right corner of the screen.
  155.       !Cd   Show MacTCP packets sent and received in the upper 
  156.             right corner of the screen.  This is the default.
  157.             The send counter becomes inverted when a resend
  158.             is performed.
  159.       !CF   Close the copyright/help textwindow.
  160.       !CH   Don't update the display.
  161.       !CS   Update the display as usual.
  162.       !CL   Display all received characters as literals in the
  163.             .edit window. 
  164.       !CM   Set the top bit (meta-bit) of the next ASCII character. 
  165.       !CR   Restore line 25.
  166.       !CT   Turn on cursor positioning using the mouse.
  167.       !Ct   Turn off cursor positioning.
  168.       !CZ   Toggle fast drawing mode (useful for library data entry 
  169.             checking).
  170.  
  171.  
  172.       ___________________________________________________
  173.  
  174.          Menu commands
  175.       ___________________________________________________
  176.  
  177.  
  178.    Macros from !\000 to !\019 correspond to the menu items from left to right, with the items numbered from 1.  E.g., "!\000\001" executes the "About dataComet" menu item.  NOTE that menu items are subject to being moved, so these mapping may change.  (Macro recording provides an easy way to get an item's macro equivalent, since menu items selected are included in the macro.)
  179.       
  180.  
  181.       ___________________________________________________
  182.  
  183.          File and Print commands
  184.       ___________________________________________________
  185.  
  186.  
  187.    Perform a file action:  (F) followed by a code:
  188.  
  189.       !FA   Append the selection to a file.
  190.       !FB   Append the selection to a file selected through a
  191.             Standard Put File dialog.
  192.       !FD   Print the emulator screen using Apple's no-longer- 
  193.             supported Streaming Text Print Manager routines.
  194.             May crash with some Printer Drivers (for example
  195.             the StyleWriter driver), but gives better alignment
  196.             of columns when using a laser printer.
  197.       !FF   Bring the Finder or application launchpad to the
  198.             front, closing sessions which are not configured
  199.             to stay open on Mandarin sleep events.
  200.       !Ff   Bring the Finder or application launchpad to the
  201.             front without closing any sessions.
  202.       !FP   Print the emulator screen using Apple's standard Print 
  203.             Manager routines.
  204.       !Fp   Print the .text window using Apple's standard Print Manager 
  205.             routines.
  206.       !FS   Save the selection in a file; if a file has not been 
  207.             opened, a Put File dialog will be performed.
  208.       !FT   Save the selection in a file; always present the Put File 
  209.             dialog.
  210.  
  211.  
  212.       ___________________________________________________
  213.  
  214.          Edit commands
  215.       ___________________________________________________
  216.  
  217.  
  218.    Perform an editing action:  (E) followed by a code:
  219.  
  220.       !EA   Select the whole screen or text.
  221.       !EB   Append the selection to the session's .edit window.
  222.       !EC   Copy  the selection to the Clipboard.
  223.       !ES   Use the standard text mode for copying the selection.
  224.       !ET   Use the Table mode when copying the selection.
  225.       !EV   Paste the selection into the emulator  screen or the .edit
  226.             window.
  227.       !EW   Select the word where the emulator cursor is located 
  228.             (the default double-click action).
  229.       !EX   Cut the selection range (works only with the .edit window).
  230.  
  231.  
  232.       ___________________________________________________
  233.  
  234.          Special copy functions
  235.       ___________________________________________________
  236.  
  237.  
  238.    Perform a formatted copy:  (c) followed by a code: 
  239.  
  240.       !cC   Clear the Clipboard.
  241.       !ca   Copy an RLIN library Name Authority record and convert
  242.             it into a NOTIS record; if the first line of the
  243.             selection does not contain the "ID:" field, it is 
  244.             assumed to be a continuation of a record and is 
  245.             appended to the portion of a record in the Clipboard.
  246.       !cA   As above, except this copy option allows supports
  247.             users who are privileged to do deletions on Name
  248.             Authority records under NOTIS.
  249.       !cb   Copy an RLIN Book record and convert it into a NOTIS
  250.             record, as described above.
  251.       !cB   As above, except this copy option allows supports
  252.             users who are privileged to do deletions on Book
  253.             records under NOTIS.
  254.  
  255.  
  256.       ___________________________________________________
  257.  
  258.          Window selection and output redirection commands
  259.       ___________________________________________________
  260.  
  261.    Bring a window to the front (w) followed by the number associated with it in the Window menu:
  262.  
  263.       !w\001
  264.  
  265.    Perform a window action (W) followed by a code:
  266.  
  267.       !WSwindowname\000   Bring a window to the front; WS followed by the       
  268.             window name and terminated with another macro or null 
  269.             ASCII character.
  270.       !W>windowname\000   Make a window the output window, so that typed
  271.             characters, PF keys, macro characters, and pastes will appear
  272.             in the named window.
  273.       !W}    Reset the output window to the standard output.
  274.  
  275.  
  276.       ___________________________________________________
  277.  
  278.             Telnet commands
  279.       ___________________________________________________
  280.  
  281.  
  282.       !tA   send Are You There;
  283.       !tB   send Telnet Break.
  284.       !tC   send Interrupt;
  285.       !tU   send Abort;
  286.       !tx   send Erase Character;
  287.       !tX   send Erase Line.
  288.       !ta   Type IP address at cursor.
  289.       !tD   Try to fix MacTCP's resend time-out.
  290.       !td   Don't try to fix MacTCP's resend time-out.  This is the default.
  291.  
  292.  
  293.       ___________________________________________________
  294.  
  295.          Scripting commands
  296.       ___________________________________________________
  297.  
  298.  
  299.    Record user input as macro commands:  (R) followed by a code:
  300.  
  301.       !RB   begin recording;
  302.       !RE   end recording and place the recording in the scrap for
  303.             pasting into the .edit window or key macro dialog.
  304.  
  305.    Delay:  (D) followed by the number of seconds to wait specified as \nnn, e.g. "!D\001".
  306.  
  307.    Loop:  (L) followed by the number of times to repeat the sequence of macro commands which follows; this sequence must be terminated by an entry containing "!L\000" (loop zero).  Using '\255' for the count will cause the loop to continue until the Command-. "cancel" key is pressed.
  308.  
  309.       !L\255echo hello!L\000
  310.    
  311.    Match String:  Delay session macro processing until host output matches string:  (Z) followed by a number indicating the number of seconds to wait before aborting; if the number is '\255', it waits forever if the string is not matched.  This entry is followed by a list of characters to match, terminated by any non-character macro command (usually a Delay entry).  You might use this in a login as follows...  
  312.  
  313.       !Z\030login:!D\000myloginname!Z\030password:!D\000!QSEnter password:!QQ
  314.  
  315.    Query the user to enter a string:  (Q) followed by P, followed by the prompt, followed by a "!Q". macro command to terminate the prompt string.  The user's response will be sent out to the host.  To enter a password, use "!QS" to replace the characters with dots.  Both the query and the response must be under 256 characters.
  316.  
  317.         !QPEnter ID:!QQ
  318.  
  319.       ___________________________________________________
  320.  
  321.  
  322.